package com.ry.synContainer;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

//同步容器
public class SynchronizedListExp {
    public static void main(String[] args) {

        List list = Collections.synchronizedList(new ArrayList<Object>());
        list.add(1);
        list.add(2);
    }
}
